package Underworld_Survival;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import static Underworld_Survival.Game.gameOutput;
import static Underworld_Survival.Game.stage;

abstract class Monster extends Role{
    private int skillCount;//技能数
    private String preEntrancePortrayal;//怪物出场前的描写
    private String monologue;//台词

    public Monster(){};
    public Monster(String name, int baseMaxHP, int baseStr, int baseDef,
                   int baseEP,int abiCount,String preEntrancePortrayal,String monologue,List<Skill> skill){
        super(name,baseMaxHP,baseStr,baseDef,baseEP);
        this.skillCount=abiCount;
        this.preEntrancePortrayal=preEntrancePortrayal;
        this.monologue=monologue;
        this.ability=new Ability(skill);
        this.baseCritMultiplier=1.5f;
        this.totalCritMultiplier=bonusCritMultiplier+baseCritMultiplier;
    }

    public void showPreEntrancePortrayal(){System.out.println(preEntrancePortrayal);}
    public void showMonologue(){//展示台词
        gameOutput.println(GameOutput.MsgType.MONOLOGUE,"“"+getMonologue()+"“");
    }

    public int getSkillCount() {return skillCount;}
    public void setSkillCount(int skillCount) {this.skillCount = skillCount;}
    public String getMonologue() {return monologue;}
    public void setMonologue(String monologue) {this.monologue = monologue;}
    public String getPreEntrancePortrayal(){return preEntrancePortrayal;}
    public void setPreEntrancePortrayal(String preEntrancePortrayal){this.preEntrancePortrayal=preEntrancePortrayal;}

}

//全局怪物列表
//小怪
//1.小狼littleWolf
class littleWolf extends Monster{
    public littleWolf(){
        super("小狼",50+(int)(stage*0.7), 8+(int)(stage*0.5),
                3+(int)(stage*0.25), 3+(int)(stage*0.6), 1,
                "一声声低沉的吼叫声想你传来，不禁让人打寒颤。竟然是一只狼，大战一触即发！",
                "嗷嗷，嗷嗷....", new ArrayList<Skill>(){{add(new normalAttack());}}
        );
    }
}
//2.大狼bigWolf
class bigWolf extends Monster{
    public bigWolf(){
        super("凶狼", 70+(int)(stage*0.7), 12+(int)(stage*0.45),
                2+(int)(stage*0.4), 3+(int)(stage*0.55),2,
                "一声声低沉的吼叫声想你传来，不禁让人打寒颤。竟然是一只大狼，大战一触即发！",
                "嗷呜~嗷呜~嗷呜~", new ArrayList<Skill>(){
            {add(new normalAttack());add(new agileSurge());}}
                //普通攻击，敏捷突袭
        );
    }
}
//3.水晶蜘蛛crystalSpider
class crystalSpider extends Monster{
    public crystalSpider(){
        super("水晶蜘蛛",80+(int)(stage*0.85), 18+(int)(stage*0.4),
                7+(int)(stage*0.6), 5+(int)(stage*0.6),3,
                "昏暗潮湿的静谧房间，弥漫着腐朽气息，墙壁火把明明灭灭，阴影在地上肆意扭动。",
                "猎物...成为琥珀吧！", new ArrayList<Skill>(){
            {add(new normalAttack());add(new crystallizedCobweb());add(new summonCrystalCluster());}}
                //普通攻击，晶化蛛网，召唤晶簇
        );
    }
}
//4.晶甲卫兵crystalGuard
class crystalGuard extends Monster{
    public crystalGuard(){
        super("晶甲卫兵",90+(int)(stage*1),18+(int)(stage*0.45),
                7+(int)(stage*0.45), 5+(int)(stage*0.6),3,
                "水晶吊灯突然停止摆动，碎片悬浮成漩涡映出卫兵轮廓。",
                "职责所在，挡我者碎！", new ArrayList<Skill>(){
            {add(new normalAttack());add(new summonCrystalCluster());add(new sword_QiRebound());}}
                //普通攻击，召唤晶簇，剑意反弹
        );


    }
}
//5.骸皮诡傀bone_SkinWeirdPuppet
class bone_SkinWeirdPuppet extends Monster{
    public bone_SkinWeirdPuppet(){
        super("骸皮诡傀",55+(int)(stage*0.5),8+(int)(stage*0.6),
                3+(int)(stage*1), 3+(int)(stage*0.7), 2,
                "人皮地图与骷髅筹码混合。骸皮诡傀现身了。",
                "竟敢对我不敬！你，将成为我的养分。这无尽黑暗，无人能逃脱...", new ArrayList<Skill>(){
            {add(new poisonFangCurse());add(new normalAttack());}}
                //普通攻击，毒牙诅咒
        );
    }
}
//6.小骨兵little_BoneSoldier
class little_BoneSoldier extends Monster{
    public little_BoneSoldier(){
        super("小骨兵", 50,6+(int)(stage*0.4),
                5+(int)(stage*0.3), 5,2,
                "熔炉内传出骨骼拼接的咔嗒声，青蓝鬼火中爬出残缺骷髅。关节缠绕着锈蚀锁链",
                "王...赐予...新生...", new ArrayList<Skill>(){
                    {add(new normalAttack());add(new ironHeadSkill());}}
                //普通攻击，铁头功
        );
    }
}

//全局boss
//1.狼人boss_Werewolf
class boss_Werewolf extends Monster{
    public boss_Werewolf(){
        super("狼人", 120,25,
                12, 16,3,
                "还未曾进入这个房间时，你就深感种压抑。你扫视着四周，周围漆黑一片。" +
                        "聚焦一处时，那地方竟有双眼！\n一个狼人！人的模样！他睁开锁链，向你走来。",
                "嗷呜~竟敢闯入我的领地！", new ArrayList<Skill>(){
            {add(new normalAttack());add(new agileSurge());add(new poisonFangCurse());}}
                //普通攻击，敏捷突袭，毒牙诅咒
        );
    }
}
//2.幻影剑士boss_MirageBlade
class boss_MirageBlade extends Monster{
    public boss_MirageBlade(){
        super("幻影剑士",150,32,
                25, 25,3,
                "光影交错，空气中弥漫着肃杀之气。幻影剑士现身了！",
                "你看到的，皆是虚妄...", new ArrayList<Skill>(){
            {add(new normalAttack());add(new afterimageSlash());add(new sword_QiRebound());}}
                //普通攻击，残像斩，剑意反弹
        );
    }
}
//3.暗影巫医boss_ShadowHealer
class boss_ShadowHealer extends Monster{
    public boss_ShadowHealer(){
        super("暗影巫医",200,45,
                25, 35,4,
                "刺鼻药味混着腐叶气息，凝滞的空气满是诡异。黑暗的房间出现了一名巫医！",
                "痛苦...既是良药...", new ArrayList<Skill>(){
            {add(new normalAttack());add(new agileSurge());
                add(new lifeSiphon());add(new darkRecovery());}}
                //普通攻击，敏捷突袭，生命虹吸，黑暗恢复
        );
    }
}
//4.熔岩巨人boss_MoltenGiant
class boss_MoltenGiant extends Monster{
    public boss_MoltenGiant(){
        super("熔岩巨人",250,45,
                35, 40,4,
                "房内空气仿佛被点燃，地板逐渐融化，橙红的熔岩开始汨汨冒出。熔岩巨人登场！",
                "大地将在怒火中燃烧！", new ArrayList<Skill>(){
            {add(new normalAttack());add(new earth_SplittingSmash());
                add(new magmaArmor());add(new doomsdayEruption());}}
                //普通攻击，地裂猛击，岩浆护甲，末日喷发
        );
    }
}
//5.骨魄统领boss_BoneSoulCommander
class boss_BoneSoulCommander extends Monster{
    public boss_BoneSoulCommander(){
        super("骨魄统领",250,45,
                40, 45,4,
                "地牢墙壁渗出暗红血雾，地面碎骨自发聚合成尖刺阵列，远处传来铁链拖曳的轰鸣。" +
                        "温度骤降，火把光芒被压缩成惨绿色，岩壁浮现出无数挣扎的骷髅浮雕。",
                "闯入者...你的骨骼将成为第8947根战旗。", new ArrayList<Skill>(){
                    {add(new normalAttack());add(new endlessEdgeOfSpear());
                        add(new earth_SplittingSmash());add(new poisonousClaw());}}
                //普通攻击，无尽兵锋，地裂猛击，剧毒爪
        );
    }
}